package models.common.entity;

import javax.persistence.Entity;

import play.db.jpa.Model;

import common.enums.HoldControllingType;
import common.enums.SholderBindStatus;

/**
 * 股东表
 * @description 
 *
 * @author zhiliang.lan
 * @createDate 2017年4月14日
 */

@Entity
public class t_shareholder extends Model{
	
	/**
	 * 构造器
	 */
	public t_shareholder(){
		
	}

	public t_shareholder(String shName, String shEmali, String shMobile, 
			Long userId, Long company_user_id, int shType, int isBondSh, String companyFullName, 
			String businessLicenseCode, String legalPersonName, String legalPersonMobile){
		super();
		this.sh_name = shName;
		this.sh_email = shEmali;
		this.sh_mobile = shMobile;
		this.user_id = userId;
		this.company_user_id = company_user_id;
		this.sh_type = shType;
		this.is_bond_sh = isBondSh;
		this.company_full_name = companyFullName;
		this.business_license_code = businessLicenseCode;
		this.legal_person_name = legalPersonName;
		this.legal_person_mobile = legalPersonMobile;
	}
	
	/** 股东userId */
    public long user_id;
	
    /** 股东名称 */
    public String sh_name;

    /** 是否绑定股东 0：已提交  1：审核中    2绑定    3不绑定  */
    private int is_bond_sh;
    
    public SholderBindStatus getSholderBondStatus(){
    	SholderBindStatus sholderBindStatus = SholderBindStatus.getEnum(is_bond_sh);
    	return sholderBindStatus;
    }
    
    public void setSholderBondStatus(SholderBindStatus sholderBindStatus){
    	this.is_bond_sh = sholderBindStatus.code;
    }

    /** 控股类型 0,"个人股东" 1,"个人控股"  2,"企业股东" 3,"企业控股" */
    private int sh_type;
    
    public HoldControllingType getHoldControllingType(){
    	HoldControllingType holdControllingType = HoldControllingType.getEnum(sh_type);
    	return holdControllingType;
    }
    
    public void setHoldControllingType(HoldControllingType holdControllingType){
    	this.sh_type = holdControllingType.code;
    }
    

    /** 股东邮箱  */
    public String sh_email;

    /** 股东手机号码 */
    public String sh_mobile;

    /** 企业的userID */
    public long company_user_id;

    /** 股东的身份证信息 */
    public String sh_idcard;
    
    /** 企业全称 */
    public String company_full_name;
    
    /** 营业执照编号 */
    public String business_license_code;
    
    /** 法人代表姓名 */
    public String legal_person_name;
    
    /** 法人手机号  */
    public String legal_person_mobile;
   
}